package com.liuyk.entity;

import java.io.Serializable;
import java.util.ArrayList;

/**
 *
 * Created by Administrator on 2015/9/19.
 */
public class Subscriptions implements Serializable{
    private static final long serialVersionUID = 706540343240524121L;
    public static String json = "jsonObjectArray";

    public Subscriptions(){}

    public static ArrayList<Channel> channels = new ArrayList<>();

    public static ArrayList<DefaultOrderMenuItems> defaultOrderMenuItems = new ArrayList<>();

    public ArrayList<Channel> getChannels() {
        return channels;
    }

    public void setChannels(ArrayList<Channel> channels) {
        Subscriptions.channels = channels;
    }

    public ArrayList<DefaultOrderMenuItems> getDefaultOrderMenuItems() {
        return defaultOrderMenuItems;
    }

    public void setDefaultOrderMenuItems(ArrayList<DefaultOrderMenuItems> defaultOrderMenuItems) {
        Subscriptions.defaultOrderMenuItems = defaultOrderMenuItems;
    }

    public ArrayList getBean(String target){
        if(target.equals("channels")){
            channels.add(new Channel());
            return channels;
        } else if(target.equals("defaultOrderMenuItems")){
            defaultOrderMenuItems.add(new DefaultOrderMenuItems());
            return defaultOrderMenuItems;
        }
        return null;
    }

}
